<template>

  <a-modal title="成果信息" v-model="showModal" :mask-closable="false" :width="1000" :footer="null">
    <a-row>
      <a-col span="24">
        <a-tag color="#189583" style="font-size: 18px; padding: 5px 10px; border-radius: 10px; background: linear-gradient(93.32deg, rgba(25,151,133,1) 2.78%,rgba(84,211,170,1) 97.62%)">
                                  <div>{{
                                      fruitDataObj.type == '3' ? '研究报告':
                                        fruitDataObj.type == '4' ? '活动成果':
                                          fruitDataObj.type == '5' ? '媒体成果':
                                            fruitDataObj.type == '6' ? '学术论文':
                                              fruitDataObj.type == '7' ? '图书出版':
                                                fruitDataObj.type == '8' ? '荣誉信息':
                                                  fruitDataObj.type == '11' ? '专利成果':
                                                    fruitDataObj.type == '12' ? '软著成果': '其他成果'
                                    }}</div>
        </a-tag>
      </a-col>
    </a-row>
    <a-row style="margin-top: 5px;">
      <a-col span="24">
        <div class="ft">{{fruitDataObj.fruitName}}</div>
      </a-col>
    </a-row>
<!--    <a-row style="margin-top: 5px;">-->
<!--      <a-col span="24">-->
<!--        <div style="display: inline-block; color: #189583; padding-right: 10px; font-size: 15px; font-weight: bold;">{{fruitDataObj.researchField == null ? fruitDataObj.field : fruitDataObj.researchField}}</div>-->
<!--        <div style="display: inline-block; font-size: 15px; padding-left: 30px;">{{fruitDataObj.orgName}}</div>-->
<!--      </a-col>-->
<!--    </a-row>-->
    <a-row style="margin-top: 5px;">
      <a-col span="24">
        <div style="display: block;font-size: 18px; ">{{fruitDataObj.allAuthorName}}</div>
      </a-col>
    </a-row>
    <a-row style="margin-top: 5px;">
      <a-col span="24">
        <div style="font-size: 18px">{{fruitDataObj.pubTime != null ? fruitDataObj.pubTime.substring(0,10) : ""}}</div>
      </a-col>
    </a-row>
    <a-row style="margin-top: 5px;" v-if="fruitDataObj.summary != null && fruitDataObj.summary != ''">
      <a-col span="24">
        <div style="font-size: 18px; background-color: #189583; border-radius: 10px; padding: 10px; color: #fff; line-height: 30px;">{{fruitDataObj.summary}}</div>
      </a-col>
    </a-row>
  </a-modal>
</template>

<script>

import {postAction} from "@/api/manage";

export default {
  name: 'FruitInfo',
  data() {
    return {
      showModal: false,
      fruitDataObj: {}
    }
  },
  computed: {},
  created(){
  },
  methods: {
    showModalInfo(fruitDataObj){
      this.showModal = true;
      this.fruitDataObj = fruitDataObj;
      this.addSearchContentLog(fruitDataObj);
    },
  addSearchContentLog(obj){
      let url = "/ndTalent/operationLog/addViewFruitLog";
      let entityObj = {
          "fruitId": obj.id,
          "fruitType": obj.type,
          "fruitName": obj.fruitName,
          "fruitField": obj.researchField,
          "fruitAuthorName": obj.allAuthorName,
          "fruitOrgName": obj.orgName,
          "pubTime": obj.pubTime,
          "summary": obj.summary
      }
      postAction(url, entityObj).then(res => {
          if (res.data.success) {
          }
      }).catch(err => {
          console.log(err)
      })
  },
  }
}
</script>
<style scoped>

.ft{
  font-weight: bold;
  font-size: 20px;
}

</style>